﻿@model Developer.Entity.Users
@{
    Layout = null;
}

<!doctype html>
<html>

<head>
    <meta charset="utf-8">
    <title></title>
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
    <link href="~/Content/UI/css/mui.min.css" rel="stylesheet" />
    <link href="~/Content/UI/css/mdui.min.css" rel="stylesheet" />
    <link rel="stylesheet" type="text/css" href="~/Content/UI/css/myprofile.css" />
    <link rel="stylesheet" href="~/Assets/Plugs/layer_mobile/need/layer.css" />
<style>
    .button1 {
        border: none;
        height: 17px;
        color: #007aff;
        width: 100%;
        font-size: 18px;
        line-height: 1;
        font-weight: 400;
        margin-bottom: 9px;
        font-family: Roboto,Noto,Helvetica,Arial,sans-serif;
        margin-top: 13px;
    }
    .button2 {
        border: none;
        height: 15px;
        font-weight: 400;
        margin-top: 1px;
        font-size: 14px;
        color: #8f8f94;
        width: 100%;
    }

</style>
</head>

<body>
    <header class="mui-bar mui-bar-nav">
        <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
        <h1 class="mui-title">我</h1>
    </header>
    <div class="mui-content" style="padding-bottom: 250px;">
        <!--
            作者：xcz1575114@outlook.com
            时间：2017-06-19
            描述：Header
        -->
        <div class="mui-card">
            <!--页眉，放置标题-->
            <div class="mui-card-header mui-card-media" style="height: 100px;">
                @{
                   
                        <img src="@Model.HeadImg" style="height: 70px; width: 70px;border-radius: 100%;" />
                 
                }
                <div style="width:55%;float: left;">
                    <p style="margin-top: 5px;margin-left: 10px;font-size: 17px;">@(Model.IsUseWechat == true ? Model.WeChats.FirstOrDefault().NickName : Model.NickName)</p>
                    <p style="margin-top: 15px;margin-left: 10px;font-size: 12px;">@Model.Account</p>
                </div>
                <div>
                    <a href="/Profile/EditMyProfile?uid=@Model.Id"><p style="margin-top: 40px;">查看编辑主页 &gt;</p></a>
                </div>
            </div>
            <!--内容区-->
            <div class="mui-card-content">
                <div class="my-attention">
                    <a href="/Profile/MyFavorites/?uid=@Model.Id">
                        <h4>@Model.Favorites.Count</h4>
                    </a>
                    <a href="/Profile/MyFavorites/?uid=@Model.Id">
                        <h5>我的收藏</h5>
                    </a>
                </div>
                <div class="horizontal-border"></div>
                <div class="my-attention">
                    <button onclick="bp_showFrame('/book/orderlist/?uid=@Model.Id','订单列表')" class="button1">
                        @Model.OrderTemps.Where(a=>a.IsAbort == false).Count()
                    </button>
                    <button onclick="bp_showFrame('/book/orderlist/?uid=@Model.Id','订单列表')" class="button2">
                        当前预定
                    </button>
                </div>
            </div>
        </div>

        <!--
            作者：xcz1575114@outlook.com
            时间：2017-06-19
            描述：Body
        -->
        <ul class="mui-table-view mui-card">
           <li class="mui-table-view-cell">
                <a href="/Profile/MyMessage?uid=@Model.Id">
                    我的消息
                    <span class="mui-badge">@Model.Messages.Where(a=>a.IsRead == false).Count()</span>
                </a> 
            </li>
            <li class="mui-table-view-cell">
                <a href="/Book/InBorrow?uid=@Model.Id">
                    待还图书
                    <span class="mui-badge">@Model.Borrowings.Where(a=>a.ReturnTime == null).Count()</span>
                </a>
            </li>
        </ul>

        <ul class="mui-table-view mui-card" style="margin-top: 10px;">
            <li class="mui-table-view-cell">
                <a class="mui-navigate-right" href="/Book/History?uid=@Model.Id">
                    历史借阅
                </a>
            </li>
            <li class="mui-table-view-cell">
                <a class="mui-navigate-right" href="/Profile/MyFavorites?uid=@Model.Id">
                    我的收藏
                </a>
            </li>
            <li class="mui-table-view-cell">
                <a class="mui-navigate-right" href="/Review/MyReviews?uid=@Model.Id">
                    我的书评
                </a>
            </li>
        </ul>

        <ul class="mui-table-view mui-card" style="margin-top: 10px;">
            <li class="mui-table-view-cell">
                <a class="mui-navigate-right" href="/Book/OrderOnline">
                    在线预订
                </a>
            </li>
            <li class="mui-table-view-cell">
                <a class="mui-navigate-right" href="/Account/FeedBack?uid=@Model.Id">
                    问题反馈
                </a>
            </li>
        </ul>
        

    </div>



    <script src="~/Content/scripts/jquery-1.10.2.min.js"></script>
    <script src="~/Content/UI/js/mui.min.js"></script>
    <script type="text/javascript" src="~/Content/UI/js/mdui.min.js"></script>
    <script src="~/Assets/Plugs/layer/layer.js"></script>
    <script src="~/Assets/Plugs/layer/extend/layer.ext.js"></script>
    <script src="~/Assets/Scripts/js.js"></script>
    <script src="~/Assets/Scripts/Msg.js"></script>
    <script type="text/javascript">
        mui.init()

        function bp_showFrame(url, title) {
            layer.open({
                type: 2,
                title: title,
                shadeClose: true,
                shade: 0.8,
                area: ['380px', '90%'],
                content: url //iframe的url
            });
            //layer.open({
            //    type: 1
            //    ,closeBtn: 1
            //    ,title: title
            //    , content: url
            //    , anim: 'up'
            //    , style: 'position:fixed; bottom:0; left:0; width: 100%; height: 200px; padding:10px 0; border:none;'
            //});
        }
    </script>
</body>

</html>
